<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>深航服务信息系统</title> 
<script src="<c:url value='/scripts/common.js'/>"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/date.js"/>" language="javascript"></script>
</head>

<body leftmargin="0" topmargin="0">
<html:form action="passengerService.html?method=passenger" method="post" styleId="passengerServiceInfoForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td class="home-content-title">
    <img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">
     &nbsp;高端旅客乘机信息查询</td>
  </tr>
  <tr>
	<td height="30" class="home-search-space">
		<table border="0" cellpadding="0" cellspacing="0">
		<tr height="30" class="home-search-space">
			<td align=right>进出港选择：</td>
			<td>
			<html:select name="passengerServiceInfoForm" property="port" size="1" styleId="port" style="width:80px">
			  <html:option  value="">全部</html:option>
			  <html:option  value="1">进港</html:option><!-- 终点站是深圳 -->
			  <html:option  value="2">出港</html:option><!-- 始发站是深圳 --> 
			</html:select>
			</td>
			<td align=right>&nbsp;</td><!-- 航站： -->
			<td>
			&nbsp;
			</td>
			<td align=right>航班号：</td>
			<td>
			<html:text property="flightNum" styleId="flightNum" onkeypress="return specialLetter();" styleClass="home-table-inputbox" size="10"/></td>
			<td align=right>日期：</td>
			<td>
			<html:text property="flightDate" styleId="flightDate" styleClass="home-table-inputbox" maxlength="18" size="10"/> 
			<img src="images/date.gif" width="16" height="15" onclick="fPopCalendar(flightDate,flightDate);return false"/>
			</td>
			
		</tr>
		<tr height="30" class="home-search-space">
			<td align=right>始发站：</td>
			<td>
			<html:select name="passengerServiceInfoForm" property="fromPort" size="1" styleId="vipTypeId" style="width:80px">
			  <html:option  value="">&nbsp;</html:option> 
			  <html:options collection="cityInfo" property="code" labelProperty="name"/> 
			</html:select></td>
			<td align=right>终点站：</td>
			<td>
			<html:select name="passengerServiceInfoForm" property="toPort" size="1" styleId="vipTypeId" style="width:80px">
			  <html:option  value="">&nbsp;</html:option> 
			  <html:options collection="cityInfo" property="code" labelProperty="name"/> 
			</html:select>
			</td>
			<td align=right>旅客类型：</td>
			<td>
			<html:select name="passengerServiceInfoForm" property="vipTypeId" size="1" styleId="vipTypeId1">
			  <html:option  value="">&nbsp;</html:option> 
			  <html:options collection="vipTypeInfo" property="id" labelProperty="name"/> 
			</html:select>
			</td>
			<td align=right>姓名：</td>
			<td>
			<html:text property="name" styleId="name" styleClass="home-table-inputbox" onkeypress="return specialLetter();" maxlength="32" size="10"/>
			</td>
			<td><input name="Submit2" type="button" class="home-inputBtn" value="查询" onClick="javascript:vipSearch();"/>
			    &nbsp;&nbsp;&nbsp;&nbsp;<input name="Submit3" type="button" class="home-inputBtn" value="重置" onClick="doReset('port','flightNum','flightDate','fromPort','toPort','vipTypeId1','name')"/>
			</td>
		 </tr>
	</table>
	</td>
   </tr>

   <tr> 
    <td valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content02"><sasis:page items="${passengerServiceInfoList}"/></td>
              </tr>
              <tr> 
                <td align="center" valign="top" class="home-edittable-space">	
		<table width="100%" border="0" cellpadding="2" cellspacing="0"  style="table-layout:fixed;word-wrap:break-word" class="list_bordercolor">
                    <tr> 
                      <td  width="55" class="home-list-title">&nbsp;航班号</td>
                      <td  width="70" class="home-list-title">&nbsp;日期</td>
                      <td  width="50" class="home-list-title">&nbsp;姓名</td>
                      <td  width="50" class="home-list-title">&nbsp;始发站</td>
                      <td  width="50" class="home-list-title">&nbsp;终点站</td>
                      <td  width="50" class="home-list-title">预计起飞时间</td>
                      <td  width="50" class="home-list-title">&nbsp;飞机号</td>
                      <td  width="60" class="home-list-title">&nbsp;航班状态</td>
                      <td  width="60" class="home-list-title">&nbsp;登机提醒</td>
                      <td  width="50" class="home-list-title">接送机人员</td>
                      <td  width="90" class="home-list-title">&nbsp;旅客类别</td>
                      <td  width="50" class="home-list-title">&nbsp;座位号</td>
                      <td  width="40" class="home-list-title">行李件数</td>
                      <td  width="60" class="home-list-title">&nbsp;旅客状态</td>
                       <td  width="50" class="home-list-title">贵宾室座位</td>
                        <td width="80" class="home-list-title">&nbsp;外貌特征</td>
		              <td class="home-list-title" width="40">历史记录</td>
                    </tr>
                    <c:forEach var="results" items="${passengerServiceInfoList}" varStatus="status">
                    <tr>
                      <td class="home-list-content"><c:if test="${results.flightInfoId!=null}"><a href="flightInfo.html?method=view&id=<c:out value='${results.flightInfoId}'/>">&nbsp;<c:out value="${results.flightNum}"/></a></c:if>
                      <c:if test="${results.flightInfoId==null}" >&nbsp;<c:out value="${results.flightNum}"/></c:if>
                       </td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightDate}"/></td>
                      <td class="home-list-content">&nbsp;<a href="vipServiceSheet.html?method=view&id=<c:out value='${results.id}'/>"><c:out value="${results.name}"/></a></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.fromPort}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.toPort}"/></td>
                      <td class="home-list-content">&nbsp;
                      <script> 
						var dateTimeR="<c:out value="${results.std}"/>";
						dateTimeR=dateTimeR.substring(11,16);
						document.write(dateTimeR) 
					  </script> 
						                      
                      </td>
                      <td class="home-list-content">
                      <a href="flightInfo.html?fromWhere=passenger&acReg=<c:out value="${results.acReg}"/>&flightDate=<c:out value="${results.flightDate}"/>">&nbsp;<c:out value="${results.acReg}"/></a>
                      </td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightState}"/></td>
                      <td class="home-list-content">
                      <a href="passengerInfo.html?flightInfoId=<c:out value='${results.flightInfoId}'/>" style="color: red">
                      <script> 
						var re=/-/g; 
						var dateTimeR="<c:out value="${results.std}"/>";
						dateTimeR=dateTimeR.replace(re,"/").substring(0,16);
						var startDate= new Date(dateTimeR); 
						var endDate= new Date(); 
						var df=(startDate.getTime()-endDate.getTime())/60/1000;
						//document.write(df+"<br>");
						if(df>30)
						document.write(">30");
						else if(10<df&&df<20)
					    document.write("<20");
						else if(df<10)
						 document.write("<10");
						else document.write("&nbsp;");
					  </script> 
                      </a>
                      </td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.receivedMan}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.vipTypeName}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.seat}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.luggageCount}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.visitantRoomStatus}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.visitantRoomSeat}"/></td>
                      <td class="home-list-content" style="word-wrap:break-word;">&nbsp;<c:out value="${results.visitantRoomFeature}"/></td>
                      <td class="home-list-content" width="30" align="center">&nbsp;
				    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand" onClick="window.location='./vipInfo.html?method=view&fromWhere=passenger&id=<c:out value="${results.vipInfoId}"/>'">&nbsp;
				      </td>
                   </tr>
		            </c:forEach> 
                  </table>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="12"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
<script>
function vipSearch(){
	//alert("come search!");
	//将需要验证的ID传入数组
	var propertyArray = new Array();
	propertyArray.push("flightNum");
	propertyArray.push("flightDate");
	propertyArray.push("name");
	//alert(propertyArray.length)
	//把验证数组传入验证特殊字符函数
	var result=checkSpecialInput(propertyArray);
	//alert("result="+result);
	if(result==true||result==null){
	     //alert(result);
	    passengerServiceInfoForm.submit();
	     
	}else{
	    alert(result);
	}
	   
	   
	   
}
//written by kellen 07-04-19
function doDelete(chkName){  
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){  
				document.forms[0].method="post";
				document.forms[0].action="./vipServiceSheet.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
	function doReset(t1,t2,t3,t4,t5,t6,t7){
		document.getElementById(t1).value="";
		document.getElementById(t2).value="";
		document.getElementById(t3).value="";
		document.getElementById(t4).value="";
		document.getElementById(t5).value="";
		document.getElementById(t6).value="";
		document.getElementById(t7).value="";		
		
	}
</script>
</html> 